Skip to main content
Socket.prototype.[Symbol.asyncDispose] - dgram - Node documentation
method Socket.prototype.[Symbol.asyncDispose]

Usage in Deno

import { Socket } from "node:dgram";
Socket.prototype.[Symbol.asyncDispose](): Promise<void>

Calls socket.close() and returns a promise that fulfills when the socket has closed.

Return Type

Promise<void>